package ddb.tasktracker.intf.context.http;

import java.util.HashMap;
import java.util.Map;

import tasktracker.core.abstraction.TaskProperty;

public class NewTaskEntity {
	private String name;
	private String trackerName;
	private String owner;
	private TaskProperty[] properties;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTrackerName() {
		return trackerName;
	}

	public void setTrackerName(String trackerName) {
		this.trackerName = trackerName;
	}

	public String getOwner() {
		return owner;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}

	public TaskProperty[] getProperties() {
		return properties;
	}

	public void setProperties(TaskProperty[] properties) {
		this.properties = properties;
	}

	public Map<String, String> getPropertiesMap() {
		HashMap<String, String> map = new HashMap<String, String>();
		for (int i = 0; i < properties.length; i++) {
			TaskProperty taskProperty = properties[i];
			map.put(taskProperty.getKey(), taskProperty.getValue());
		}
		return map;
	}
}
